
function makeflowernum() {
	var a="共有这些花束：";
	var grouptotalprice =0;
	var flowercount = document.getElementById("flowercount").value;
	var count = parseInt(flowercount);
	
	
	for (var i = 1; i <= count; i++) {
		var flowername = "flowername" + i;
		var flowernum = "flowernum" + i;
		var flowerprice = "flowerprice" + i;
		var totalprice = "totalprice" + i;
		
		
		var flowernames = document.getElementById(flowername).value;
		var flowernums = document.getElementById(flowernum).value;
		var flowerprices = document.getElementById(flowerprice).value;
		
		if (flowernums != 0) {
			var totalprices = parseInt(flowernums) * parseInt(flowerprices);

			grouptotalprice =grouptotalprice+parseInt(totalprices);

			document.getElementById(totalprice).value = totalprices;
			document.getElementById("grouptotalPrice").value = grouptotalprice;
			var b=flowernames+flowernums+"扎";
			a+=b+"+";
			document.getElementById("privateDetails").value= a;
			document.getElementById("totalnum").innerHTML= a;
			document.getElementById("tprice").innerHTML =grouptotalprice ;

		}

	
	}
}

var sid=0;
var ssid=1;
function sum() {
	var flowercount = document.getElementById("flowercount").value;
	var count = parseInt(flowercount);
	var orderid=document.getElementById("orderid").value;
	
	for (var i = 1; i <= count; i++) {
		var flowername = "flowername" + i;
		var flowernum = "flowernum" + i;
		var flowerId = "flowerId"+i;
		var id=orderid+sid;
		var flowerIds=document.getElementById(flowerId).value;
		var flowernames = document.getElementById(flowername).value;
		var flowernums = document.getElementById(flowernum).value;
		if (flowernums != 0) {
			$("#showchoose").append("<input type='hidden' name='privateDetailList["+sid+"].id' value='"+id+"'/>"+
					"<input type='hidden' name='privateDetailList["+sid+"].flowerId' value='"+flowerIds+"'/>"+
					"<input type='hidden' name='privateDetailList["+sid+"].name' value='"+flowernames+"'/>"+
					"<input type='hidden' name='privateDetailList["+sid+"].num' value='"+flowernums+"'/>"+
					"<input type='hidden' name='privateDetailList["+sid+"].orderid' value='"+orderid+"'/><br>"
					);	
				sid++;
				ssid++;
		}
		
}
}
